const fs = require('fs')
const Mock = require('mockjs')
const starts = ["北京", "上海", "苏州", "南京"]
const ends = ["三亚", "厦门", "广州", "深圳"]
const data = Mock.mock({
  "list|10000": [{
    "id": "@id",
    "start|1": starts,
    "end|1": ends,
    "isSeat": "@boolean",
    "isSpeed": "@boolean",
    "startTime": "@time",
    "tick": {
      "vip|1000-2000":1,
      "firstTick|500-1000": 1,
      "secondTick|100-500" : 1
    }
  }]
})

fs.writeFileSync('tripTrain.json', JSON.stringify(data.list))